home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
cnet
/
mfb.lha
/
MF.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1994-06-28
|
3KB
|
121 lines
/* Multi-Feedback */
Options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
tr=transmit ; se=sendstring ; gu=getuser
if ~exists("pfiles:sysoplist") then signal CONFIG
se 'n1c6Want to leave feedback [Y/N]?'
ASK:
getchar ; yn=result
if yn='n' | yn='N' then signal QUIT
if yn='y' | yn='Y' then signal begin
if yn="" then signal begin
signal ASK
BEGIN:
/* read in the names of the sysops */
if ~exists("pfiles:sysoplist") then do
tr 'could not find sysop list!'
exit
end
call open(sl,"pfiles:sysoplist","R")
howmany=readln(sl)
do x=1 to howmany
coacct.x=readln(sl)
coname.x=readln(sl)
end
call close(sl)
/* display them */
se 'f1c6'
tr ' Multi-Feedback written by Vermithrax'
tr ' of Hell''s Furnace BBS!'
tr ' 405-789-0038'
tr ' ----------------------------------------------------------------------'
tr 'n1c7Who would you like to direct this feedback to?n1'
do x=1 to howmany
tr coacct.x' 'coname.x
end
se 'n1c2Enter the account number of the recipient (0=quit/default=1): '
query ; sendto=result
if sendto="" then sendto=1
if sendto="0" then signal quit
/* write the mail */
cleareditor
calleditor 50
setmailsubj "Feedback"
writemail sendto
signal quit
CONFIG:
tr 'n1c7Could not find config! We need to set you up!'
tr 'c4Press any key...g1'
CONFIG3:
tr 'f1c2Before we go on, you need to know the following items:'
tr 'c31. How many co-sysops you wish to include'
tr 'c42. All of your co-sysops account numbers'
tr 'c53. Your co-sysops names/handles'
tr 'n1c6If you don''t have this information, you can quit now and use the UI'
tr 'command to get this information.'
se 'n1c7Are you ready to continue? (Y/N) '
CONFIG1:
getchar ; cyn=result
if cyn="y" | cyn="Y" then signal CONFIG2
if cyn="n" | cyn="N" then signal QUIT
signal CONFIG1
CONFIG2:
se 'f1n1c3How many co-sysops will be included in this list? (Include yourself!) '
query ; chowmany=result
do z=1 to chowmany
se 'Account number of co/sysop number 'z': '
query ; cacct.z=result
se 'Handle (or name) of co/sysop number 'z': '
query ; chan.z=result
tr ' '
end
call open(slw,"pfiles:sysoplist","W")
call writeln(slw,chowmany)
do a=1 to chowmany
call writeln(slw,cacct.a)
call writeln(slw,chan.a)
end
call close(slw)
if ~exists("pfiles:sysoplist") then do
tr 'could not find sysop list!'
exit
end
call open(sl,"pfiles:sysoplist","R")
howmany=readln(sl)
do x=1 to howmany
coacct.x=readln(sl)
coname.x=readln(sl)
end
call close(sl)
tr 'n1c6'
do x=1 to howmany
tr coacct.x' 'coname.x
end
se 'n1c7Is this correct? (Y/N) '
getchar ; cyn=result
if cyn="y" | cyn="Y" then Signal CONFIG4
if cyn="n" | cyn="N" then signal CONFIG3
CONFIG4:
tr 'c7n1Done! Use the command again to test it!'
QUIT:
tr ''
EXIT
SYNTAX: ; ERROR: ; IOERR:
tr 'c1___________________________________________________________________'
tr 'n1c7'rc' ('errortext(rc)') in line 'sigl'.'
tr 'c1___________________________________________________________________n1'
bufferflush
exit